// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  ts_c_union_define.h
// Project line  :  ICT
// Department    :  ICT Processor Chipset Development Dep
// Author        :  Huawei
// Version       :  1.0
// Date          :  2017/11/13
// Description   :  The description of Hi MINI project
// Others        :  Generated automatically by nManager V4.2 
// History       :  Huawei 2018/05/16 10:46:14 Create file
// ******************************************************************************

#ifndef __TS_C_UNION_DEFINE_H__
#define __TS_C_UNION_DEFINE_H__

/* Define the union U_DOORBELL_STS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    doorbell_sts : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_DOORBELL_STS;

/* Define the union U_DOORBELL_CFG */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    doorbell_cfg : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_DOORBELL_CFG;

/* Define the union U_SRAM */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    sram : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_SRAM;

/* Define the union U_BS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    bs : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_BS;

/* Define the union U_SYSCTRL0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    sysctrl0 : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_SYSCTRL0;

/* Define the union U_TIMER0_REG */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    timer0_reg : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_TIMER0_REG;

/* Define the union U_WDOG_REG1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    wdog_reg1 : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_WDOG_REG1;

/* Define the union U_WDOG_REG0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    wdog_reg0 : 40  ; /* [39:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_WDOG_REG0;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_DOORBELL_STS DOORBELL_STS ; /* 1F0800000 */
    volatile U_DOORBELL_CFG DOORBELL_CFG ; /* 1F0400000 */
    volatile U_SRAM         SRAM         ; /* 1F0200000 */
    volatile U_BS           BS           ; /* 1F0110000 */
    volatile U_SYSCTRL0     SYSCTRL0     ; /* 1F0030000 */
    volatile U_TIMER0_REG   TIMER0_REG   ; /* 1F0020000 */
    volatile U_WDOG_REG1    WDOG_REG1    ; /* 1F0010000 */
    volatile U_WDOG_REG0    WDOG_REG0    ; /* 1F0000000 */

} S_ts_REGS_TYPE;

/* Declare the struct pointor of the module ts */
extern volatile S_ts_REGS_TYPE *goptsAllReg;

/* Declare the functions that set the member value */
int iSetDOORBELL_STS_doorbell_sts(unsigned int udoorbell_sts);
int iSetDOORBELL_CFG_doorbell_cfg(unsigned int udoorbell_cfg);
int iSetSRAM_sram(unsigned int usram);
int iSetBS_bs(unsigned int ubs);
int iSetSYSCTRL0_sysctrl0(unsigned int usysctrl0);
int iSetTIMER0_REG_timer0_reg(unsigned int utimer0_reg);
int iSetWDOG_REG1_wdog_reg1(unsigned int uwdog_reg1);
int iSetWDOG_REG0_wdog_reg0(unsigned int uwdog_reg0);

#endif // __TS_C_UNION_DEFINE_H__
